﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="myorders.aspx.cs" Inherits="myorders" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>我的订单</title>
    <link href="css/guozhi.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <style type="text/css">
        .g-ipt
        {
            background-color: #FBFBFB;
            background-image: url("../images/bgx.png");
            background-position: 0 -72px;
            background-repeat: repeat-x;
            border: 1px solid #C1C1C1;
            color: #444444;
            font-family: Verdana,arial,sans-serif;
            font-size: 14px;
            ime-mode: disabled;
            line-height: normal;
            margin: 0;
            padding: 4px;
            text-align: left;
            vertical-align: middle;
            width: 150px;
        }
        
        .sd
        {
            float: left;
            padding-left: 100px;
            padding-top: 8px;
        }
        .btnS
        {
            background-image: url(images/gz_me_15.gif);
            border: 0;
            width: 68px;
            height: 28px;
        }
    </style>
</head>
<body>
    <form id="frmOrder" runat="server">
    <div class="container">
        <!--#include file="common/header.htm"-->
        <!--#include file="common/quickBuy.htm"-->
        <script type="text/javascript">
           
            var ioptaction = function (id, ste) {

                $.get("/ajax/ajaxcustomer.ashx",
                            { methodName: "SubmitOrCancelCustomerOrder", oid: id, ste: ste },
                             function (res) {
                                 if (res != "0") {
                                     window.location.reload();
                                 }
                             })
            }
                      
        </script>
        <div class="register">
            <div class="myorder">
                <span class="left_m">
                    <img src="images/gz_me_08.gif" width="122" height="39" /></span><span class="sd">更多历史订单查询：<input
                        runat="server" onclick="WdatePicker({readOnly:true})" id="start" readonly="true"
                        type="text" class="g-ipt" autocomplete="off" />&nbsp;--&nbsp;<input type="text" class="g-ipt"
                            id="end" readonly="true" runat="server" onclick="WdatePicker({readOnly:true})"
                            autocomplete="off" /></span> <span class="chaxun">
                                <%--<img alt="" src="images/gz_me_15.gif" width="68" height="28" border="0" />--%>
                                <asp:Button runat="server" ID="btnSearch" Text="" CssClass="btnS" OnClick="btnSearch_Click" />
                            </span>
                <div style="clear: both;">
                </div>
            </div>
            <style type="text/css">
                .g-ipt
                {
                    background-color: #FBFBFB;
                    background-image: url("../images/bgx.png");
                    background-position: 0 -72px;
                    background-repeat: repeat-x;
                    border: 1px solid #C1C1C1;
                    color: #444444;
                    font-family: Verdana,arial,sans-serif;
                    font-size: 14px;
                    ime-mode: disabled;
                    line-height: normal;
                    margin: 0;
                    padding: 4px;
                    text-align: left;
                    vertical-align: middle;
                }
            </style>
            <div class="table_dd">
                <table width="770" cellspacing="0" id="dataTable">
                    <tr class="style_g">
                        <td class="styleb">
                            订单号
                        </td>
                        <td>
                            收货人
                        </td>
                        <td>
                            订单金额
                        </td>
                        <td>
                            交易状态
                        </td>
                        <td>
                            下单时间
                        </td>
                        <td>
                            送达时间
                        </td>
                        <td>
                            付款方式
                        </td>
                        <td>
                            操作
                        </td>
                    </tr>
           
                    <asp:Repeater ID="rpt_Orders" runat="server">
                        <ItemTemplate>
                            <tr id="template">
                                <td class="styleb">
                                    <%#Eval("OrderId") %>
                                </td>
                                <td>
                                    <%#Eval("CustomerName")%>
                                </td>
                                <td>
                                    <%#Eval("OrderAmount")%>
                                </td>
                                <td>
                                    <%#OderState(Convert.ToInt32(Eval("OrderState")))%>
                                </td>
                                <td>
                                    <%#Eval("CreateDate")%>
                                </td>
                                <td>
                                    <%#Eval("ActualDeliveryDate")%>
                                </td>
                                <td>
                                    <%#GetPaymentType(Eval("PaymentType").ToString())%>
                                </td>
                                <td>
                                    <%--<a href='javascript://' style='text-decoration: none; color: black;' onclick="ioptaction('<%#Eval("OrderId") %>',' <%#Eval("OrderState") %>')">
                                        <%#Eval("OrderState").ToString()=="5"?"提交订单":Eval("OrderState").ToString()=="1"?"取消订单":"" %>
                                    </a>--%>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                    <tr id="NotResult" runat="server" visible="false">
                        <td colspan='7'>
                            没有符合此阶段的订单记录哦
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <!--#include file="common/bottom.htm"-->
    </div>
    </form>
</body>
</html>
